package com.authine.cloudpivot.ext.enums.order;

/**
 * @author 张天赐
 */
public enum OrganizationTypeEnum {
    /**
     * 供应商类型
     */
    PlatformVendor("平台供应商"),
    OriginalVendor("原有供应商");
    public String des;

    OrganizationTypeEnum(String des) {
        this.des = des;
    }

    public static OrganizationTypeEnum switchNew(Boolean platform) {
        if (platform) {
            return OrganizationTypeEnum.OriginalVendor;
        } else {
            return OrganizationTypeEnum.PlatformVendor;
        }
    }

    public static Boolean switchOld(String type) {
        return type.equals(OrganizationTypeEnum.OriginalVendor.des);
    }

}
